home *** CD-ROM | disk | FTP | other *** search
-
-
- /*************************************************************************
- ** *
- ** Miscellaneous definitions used by the X25 interface modules *
- ** *
- **-----------------------------------------------------------------------*
- ** *
- ** Copyright Apple Computer, Inc. 1987-88 *
- ** All Rights Reserved *
- ** Apple Computer Confidential *
- ** *
- **-----------------------------------------------------------------------*
- ** *
- ** Revision History: *
- ** *
- ** *
- ** *
- *************************************************************************/
-
-
-
- #include <X25Types.h>
- #include <initab.h>
-
-
- /*
- * Locally used message code definitions
- */
-
- #define X25INTER 0x0c8 /* message code for waking up X.25 task */
-
-
-
- /********************************************************************************************
- *
- * The following structures define the format of system and link configuration messages
- *
- *******************************************************************************************/
-
-
-
- /* The following structure defines a system initialization table message. It is used for two
- purposes, first and formost by the administration program to provide link parameters
- to the X25 software. Secondly, it is used by applications to read the system parameters */
-
-
- typedef struct
- {
- X25Msg sys_header; /* defined in file x25server.h */
- struct mon_struc monitor_seg; /* defined in file Initab.h */
- struct swit_struc switch_seg; /* defined in file Initab.h */
- #ifdef LMS
- struct lms_g_struc lms_seg; /* defined in file Initab.h */
- #endif
- UWORD buf_pools[FILLM]; /* defined in file Initab.h */
- }sys_table;
-
-
-
- /* The following structure defines a link initialization table message. It is used for two
- purposes, first and formost by the administration program to provide link parameters
- to the X25 software. Secondly, it is used by applications to read the link parameters and
- local network address. The name, type, and address fields are formatted as follows:
-
- link_name : pascal string
- link_type : pascal string
- link_address: pascal string of address digits with the top nibble of each digit cleared
-
- Example address of 311040800435 would be formatted as:
-
- 0c 03 01 01 00 04 00 08 00 00 04 03 05 */
-
- #define namesize 36
- #define addrsize 16
-
-
- typedef struct link_table
- {
- X25Msg link_header; /* defined in file x25server.h */
- char link_name[namesize];
- char link_type[namesize];
- char dte_address[addrsize];
- struct fram_struc frame_seg; /* defined in file initab.h */
- struct pak_struc packet_seg; /* defined in file initab.h */
- UWORD pvc_struc[FILL]; /* defined in file initab.h */
- }link_table;
-
-
-
-
- pascal void illegal() extern 0x4afc;
- pascal void noop() extern 0x4e71;
-
-
- #define NOMEM 0xf0
- #define NOMSG 0xf1
-
- #define NIL ((void *) 0)
-
- #define true 1
- #define false 0
-
- /*
- * Debug Aids
- */
-
- #ifndef NDEBUG
- #define assert(exp) \
- if ( ! ( exp ) ) { \
- illegal ( ); \
- };
- #else
- #define assert(exp)
- #endif NDEBUG
-
- /*
- * First Level of debug checking - must be left on at all times
- */
-
- #ifndef NDEBUG
- #ifdef D1
- #define assert_1(exp) \
- if ( ! ( exp ) ) { \
- illegal ( ); \
- };
- #else
- #define assert(exp)
- #endif D1
- #else
- #define assert(exp)
- #endif NDEBUG
-
- /*
- * Second Level of debug checking - can be left off
- */
-
- #ifndef NDEBUG
- #ifdef D2
- #define assert_2(exp) \
- if ( ! ( exp ) ) { \
- illegal ( ); \
- };
- #else
- #define assert(exp)
- #endif D2
- #else
- #define assert(exp)
- #endif NDEBUG
-
- /*
- * Third Level of debug checking - real nit-picking stuff
- */
-
- #ifndef NDEBUG
- #ifdef D3
- #define assert_3(exp) \
- if ( ! ( exp ) ) { \
- illegal ( ); \
- };
- #else
- #define assert(exp)
- #endif D3
- #else
- #define assert(exp)
- #endif NDEBUG
-
-
-